package com.project.xsf.controller;

import com.project.xsf.entity.TAssess;
import com.project.xsf.service.TAssessAnswerService;
import com.project.xsf.service.TAssessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@CrossOrigin
@RestController
@RequestMapping("/tAssess")
public class TAssessController {
    @Autowired
    private TAssessService  tAssessService;
    @Autowired
    private TAssessAnswerService tAssessAnswerService;
     @PostMapping("/queryUserIfWritreAssessAnswer")
    public Boolean queryUserIfWritreAssessAnswer(HttpSession session){
        //判断用户是否填写风险问卷
         Boolean aBoolean = tAssessAnswerService.queryAnswerCountById(session, 1);
         return aBoolean;
     }
}
